<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, ininial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="../static/lib/Semantic-UI/dist/semantic.min.css"
          th:href="@{/lib/Semantic-UI/dist/semantic.min.css}">
    <link rel="stylesheet" type="text/css" href="../static/css/me.css" th:href="@{/css/me.css}">
    <title>首页</title>
</head>
<body>
<!--导航-->
<nav class="ui inverted segment m-padded-td-mini m-shadow-small" th:replace="_fragments :: menu(1)">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu ">

            <h2 class="ui lightblue header item"><img src="../static/images/1.jpg" th:src="@{/images/1.jpg}" alt=""
                                                      class="ui avatar image m-img-place">ToutuBlog</h2>
            <a href="#" class="active m-item item m-mobile-hide"><i class="home icon"></i>首页</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="tags icon"></i>标签</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="idea icon"></i>分类</a>
            <a href="#" class="m-item item m-mobile-hide"><i class="archive icon"></i>归档</a>
            <!--搜索栏-->
            <div class="right m-item item m-mobile-hide">
                <form name="search" action="#" th:action="@{/search}" method="post" target="_blank">
                    <div class="ui icon inverted transparent input m-margin-tb-tiny">
                        <input type="text" name="query" placeholder="搜索" th:value="${query}">
                        <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-top-right m-computer-hide ">
        <i class="sidebar icon"></i>
    </a>
</nav>

<!--中间-->
<div class="m-padded-td-large  m-container">
    <x></x>
    <div class="ui container">
        <div class="ui stackable grid">
            <div class="eleven wide column">
                <!--头部-->
                <div class="ui segment">
                    <div class="ui middle aligned two column grid">
                        <div class="column">
                            <h3 class="ui lightblue header">博客</h3>
                        </div>
                        <div class="right aligned column">
                            共 <h2 class="ui orange header m-inline-block" th:text="${page.totalElements}">2</h2>篇
                        </div>
                    </div>
                </div>

                <!--中间-->
                <div class="ui top attached segment">
                    <div class="ui padded vertical segment m-padded-td-large" th:each="blog : ${page.content}">
                        <div class="ui middle aligned stackable mobile reversed grid">
                            <div class="eleven wide column">
                                <h3 class="ui header"><a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank"
                                                         class="m-black" th:text="${blog.title}">标题1</a></h3>
                                <p class="m-text-spaces" th:text="|${blog.description}......|">
                                    秋起，有微风滑过的清香，有阳光照射的明媚，有树叶儿滑落的声响，还有，一抹抹微凉拂过心头的舒畅。微风，轻掀起衣角，轻吻着发丝，不经意间，那些春花夏梦的记忆，就感染这个多情的秋季。于是，心，慢慢的沉浸，轻轻的驻足，让心停歇，聆听风，倾听雨，原来，岁月处处都充满着暖意……</p>
                                <div class="ui grid">
                                    <div class="eleven wide column">
                                        <div class="ui mini horizontal link list">
                                            <div class="item">
                                                <img src="https://picsum.photos/id/237/100/100"
                                                     th:src="@{${blog.user.avatar}}" alt="" class="ui avatar image">
                                                <div class="content"><a href="#" class="header"
                                                                        th:text="${blog.user.nickname}">王伟</a></div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon"></i> <span
                                                    th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">2021-06-08</span>
                                            </div>
                                            <div class="item">
                                                <i class="eye icon"></i> <span th:text="${blog.views}">1234</span>
                                            </div>
                                            <div class="item">
                                                <i class="heart icon"></i> <span th:text="${blog.hearts}">12</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="right aligned five wide column">
                                        <a href="#" target="_blank"
                                           class="ui teal lightblue label m-padded-tiny m-text-thin"
                                           th:text="${blog.type.name}">认知升级</a>
                                    </div>
                                </div>
                            </div>
                            <div class="five wide column">
                                <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                                    <img src="https://picsum.photos/seed/picsum/420/250"
                                         th:src="@{${blog.firstPicture}}" alt="" class="ui rounded image">

                                </a>
                            </div>
                        </div>
                    </div>
                    <!--/*-->
                    <div class="ui padded vertical segment m-padded-td-large2">
                        <div class="ui middle aligned stackable mobile reversed grid">
                            <div class="eleven wide column">
                                <h3 class="ui header">标题1</h3>
                                <p class="m-text-spaces">
                                    秋起，有微风滑过的清香，有阳光照射的明媚，有树叶儿滑落的声响，还有，一抹抹微凉拂过心头的舒畅。微风，轻掀起衣角，轻吻着发丝，不经意间，那些春花夏梦的记忆，就感染这个多情的秋季。于是，心，慢慢的沉浸，轻轻的驻足，让心停歇，聆听风，倾听雨，原来，岁月处处都充满着暖意……</p>
                                <div class="ui grid">
                                    <div class="eleven wide column">
                                        <div class="ui mini horizontal link list">
                                            <div class="item">
                                                <img src="https://picsum.photos/id/237/100/100" alt=""
                                                     class="ui avatar image">
                                                <div class="content"><a href="#" class="header">王伟</a></div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon"></i> 2021-06-08
                                            </div>
                                            <div class="item">
                                                <i class="eye icon"></i> 1234
                                            </div>
                                            <div class="item">
                                                <i class="heart icon"></i> 12
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="five wide column">
                                <a href="#" target="_blank">
                                    <img src="https://picsum.photos/seed/picsum/420/250" alt=""
                                         class="ui rounded image">

                                </a>
                            </div>
                        </div>
                    </div>
                    <div class="ui padded vertical segment m-padded-td-large2">
                        <div class="ui middle aligned stackable mobile reversed grid">
                            <div class="eleven wide column">
                                <h3 class="ui header">标题1</h3>
                                <p class="m-text-spaces">
                                    秋起，有微风滑过的清香，有阳光照射的明媚，有树叶儿滑落的声响，还有，一抹抹微凉拂过心头的舒畅。微风，轻掀起衣角，轻吻着发丝，不经意间，那些春花夏梦的记忆，就感染这个多情的秋季。于是，心，慢慢的沉浸，轻轻的驻足，让心停歇，聆听风，倾听雨，原来，岁月处处都充满着暖意……</p>
                                <div class="ui grid">
                                    <div class="eleven wide column">
                                        <div class="ui mini horizontal link list">
                                            <div class="item">
                                                <img src="https://picsum.photos/id/237/100/100" alt=""
                                                     class="ui avatar image">
                                                <div class="content"><a href="#" class="header">王伟</a></div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon"></i> 2021-06-08
                                            </div>
                                            <div class="item">
                                                <i class="eye icon"></i> 1234
                                            </div>
                                            <div class="item">
                                                <i class="heart icon"></i> 12
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="five wide column">
                                <a href="#" target="_blank">
                                    <img src="https://picsum.photos/seed/picsum/420/250" alt=""
                                         class="ui rounded image">

                                </a>
                            </div>
                        </div>
                    </div>
                    <div class="ui padded vertical segment m-padded-td-large2">
                        <div class="ui middle aligned stackable mobile reversed grid">
                            <div class="eleven wide column">
                                <h3 class="ui header">标题1</h3>
                                <p class="m-text-spaces">
                                    秋起，有微风滑过的清香，有阳光照射的明媚，有树叶儿滑落的声响，还有，一抹抹微凉拂过心头的舒畅。微风，轻掀起衣角，轻吻着发丝，不经意间，那些春花夏梦的记忆，就感染这个多情的秋季。于是，心，慢慢的沉浸，轻轻的驻足，让心停歇，聆听风，倾听雨，原来，岁月处处都充满着暖意……</p>
                                <div class="ui grid">
                                    <div class="eleven wide column">
                                        <div class="ui mini horizontal link list">
                                            <div class="item">
                                                <img src="https://picsum.photos/id/237/100/100" alt=""
                                                     class="ui avatar image">
                                                <div class="content"><a href="#" class="header">王伟</a></div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon"></i> 2021-06-08
                                            </div>
                                            <div class="item">
                                                <i class="eye icon"></i> 1234
                                            </div>
                                            <div class="item">
                                                <i class="heart icon"></i> 12
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="five wide column">
                                <a href="#" target="_blank">
                                    <img src="https://picsum.photos/seed/picsum/420/250" alt=""
                                         class="ui rounded image">

                                </a>
                            </div>
                        </div>
                    </div>
                    <div class="ui padded vertical segment m-padded-td-large2">
                        <div class="ui middle aligned stackable mobile reversed grid">
                            <div class="eleven wide column">
                                <h3 class="ui header">标题1</h3>
                                <p class="m-text-spaces">
                                    秋起，有微风滑过的清香，有阳光照射的明媚，有树叶儿滑落的声响，还有，一抹抹微凉拂过心头的舒畅。微风，轻掀起衣角，轻吻着发丝，不经意间，那些春花夏梦的记忆，就感染这个多情的秋季。于是，心，慢慢的沉浸，轻轻的驻足，让心停歇，聆听风，倾听雨，原来，岁月处处都充满着暖意……</p>
                                <div class="ui grid">
                                    <div class="eleven wide column">
                                        <div class="ui mini horizontal link list">
                                            <div class="item">
                                                <img src="https://picsum.photos/id/237/100/100" alt=""
                                                     class="ui avatar image">
                                                <div class="content"><a href="#" class="header">王伟</a></div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon"></i> 2021-06-08
                                            </div>
                                            <div class="item">
                                                <i class="eye icon"></i> 1234
                                            </div>
                                            <div class="item">
                                                <i class="heart icon"></i> 12
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="five wide column">
                                <a href="#" target="_blank">
                                    <img src="https://picsum.photos/seed/picsum/420/250" alt=""
                                         class="ui rounded image">

                                </a>
                            </div>
                        </div>
                    </div>
                    <div class="ui padded vertical segment m-padded-td-large2">
                        <div class="ui middle aligned stackable mobile reversed grid">
                            <div class="eleven wide column">
                                <h3 class="ui header">标题1</h3>
                                <p class="m-text-spaces">
                                    秋起，有微风滑过的清香，有阳光照射的明媚，有树叶儿滑落的声响，还有，一抹抹微凉拂过心头的舒畅。微风，轻掀起衣角，轻吻着发丝，不经意间，那些春花夏梦的记忆，就感染这个多情的秋季。于是，心，慢慢的沉浸，轻轻的驻足，让心停歇，聆听风，倾听雨，原来，岁月处处都充满着暖意……</p>
                                <div class="ui grid">
                                    <div class="eleven wide column">
                                        <div class="ui mini horizontal link list">
                                            <div class="item">
                                                <img src="https://picsum.photos/id/237/100/100" alt=""
                                                     class="ui avatar image">
                                                <div class="content"><a href="#" class="header">王伟</a></div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon"></i> 2021-06-08
                                            </div>
                                            <div class="item">
                                                <i class="eye icon"></i> 1234
                                            </div>
                                            <div class="item">
                                                <i class="heart icon"></i> 12
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="five wide column">
                                <a href="#" target="_blank">
                                    <img src="https://picsum.photos/seed/picsum/420/250" alt=""
                                         class="ui rounded image">

                                </a>
                            </div>
                        </div>
                    </div>
                    <!--*/-->
                </div>

                <!--底部-->
                <div class="ui attached segment" th:if="${page.totalPages}>1">
                    <div class="ui middle aligned two column grid">
                        <div class="column">
                            <a href="#" th:href="@{/(page=${page.number}-1)}" th:unless="${page.first}"
                               class="ui mini teal basic button">上一页</a>
                        </div>
                        <div class="right aligned column">
                            <a href="#" th:href="@{/(page=${page.number}+1)}" th:unless="${page.last}"
                               class="ui mini teal basic button">下一页</a>
                        </div>
                    </div>
                </div>
            </div>
            <!--右边-->
            <div class="five wide column">
                <!--分类-->
                <div class="ui segments">
                    <div class="ui secondary segment">
                        <div class="ui two column grid">
                            <div class="column"><i class="idea icon"></i>分类</div>
                            <div class="column  right aligned">
                                <a href="#" target="_blank">更多<i class="angle double right icon"></i></a>
                            </div>
                        </div>
                    </div>
                    <div class="ui segment ">
                        <div class="ui fluid vertical menu">
                            <a href="#" class="item" th:each="type : ${types}">
                                <span th:text="${type.name}">类型1</span>
                                <div class="ui label left pointing basic brown" th:text="${#arrays.length(type.blogs)}">
                                    13
                                </div>
                            </a>
                            <!--/*-->
                            <a href="#" class="item">
                                类型2
                                <div class="ui label left pointing basic brown">13</div>
                            </a>
                            <a href="#" class="item">
                                类型3
                                <div class="ui label left pointing basic brown">13</div>
                            </a>
                            <a href="#" class="item">
                                类型4
                                <div class="ui label left pointing basic brown">13</div>
                            </a>
                            <a href="#" class="item">
                                类型5
                                <div class="ui label left pointing basic brown">13</div>
                            </a>
                            <a href="#" class="item">
                                类型6
                                <div class="ui label left pointing basic brown">13</div>
                            </a>
                            <!--*/-->
                        </div>
                    </div>
                </div>
                <!--标签-->
                <div class="ui segments">
                    <div class="ui secondary segment">
                        <div class="ui two column grid">
                            <div class="column"><i class="tags icon"></i>标签</div>
                            <div class="column  right aligned">
                                <a href="#" target="_blank">更多<i class="angle double right icon"></i></a>
                            </div>
                        </div>
                    </div>
                    <div class="ui segment">
                        <a href="#" target="_blank" class="ui label  basic brown m-margin-tb-tiny left pointing"
                           th:each="tag : ${tags}">
                            <span th:text="${tag.name}">标签1</span>
                            <div class="detail" th:text="${#arrays.length(tag.blogs)}">10</div>
                        </a>
                        <!--/*-->
                        <a href="#" target="_blank" class="ui label  basic brown m-margin-tb-tiny left pointing">
                            标签2
                            <div class="detail">10</div>
                        </a>
                        <a href="#" target="_blank" class="ui label  basic brown m-margin-tb-tiny left pointing">
                            标签3
                            <div class="detail">10</div>
                        </a>
                        <a href="#" target="_blank" class="ui label  basic brown m-margin-tb-tiny left pointing">
                            标签4
                            <div class="detail">10</div>
                        </a>
                        <a href="#" target="_blank" class="ui label  basic brown m-margin-tb-tiny left pointing">
                            标签5
                            <div class="detail">10</div>
                        </a>
                        <a href="#" target="_blank" class="ui label  basic brown m-margin-tb-tiny left pointing">
                            标签6
                            <div class="detail">10</div>
                        </a>
                        <a href="#" target="_blank" class="ui label  basic brown m-margin-tb-tiny left pointing">
                            标签7
                            <div class="detail">10</div>
                        </a>
                        <a href="#" target="_blank" class="ui label  basic brown m-margin-tb-tiny left pointing">
                            标签8
                            <div class="detail">10</div>
                        </a>
                        <!--*/-->
                    </div>
                </div>
                <!--最新推荐-->
                <div class="ui segments">
                    <div class="ui secondary segment">
                        <i class="thumbs up icon"></i>推荐
                    </div>
                    <div class="ui segment" th:each="blog : ${recommendBlogs}">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="m-black m-text-thin"
                           th:text="${blog.title}">用户故事（User Story）</a>
                    </div>
                    <!--/*-->
                    <div class="ui segment">
                        <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                    </div>
                    <div class="ui segment">
                        <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                    </div>
                    <div class="ui segment">
                        <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                    </div>
                    <div class="ui segment">
                        <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                    </div>
                    <div class="ui segment">
                        <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                    </div>
                    <div class="ui segment">
                        <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                    </div>
                    <div class="ui segment">
                        <a href="#" target="_blank" class="m-black m-text-thin">用户故事（User Story）</a>
                    </div>
                    <!--*/-->
                </div>

            </div>
        </div>
    </div>
</div>
<!--底部-->
<footer th:replace="_fragments :: footer" class="ui inverted vertical segment m-padded-td-foot">
    <div class="ui container center aligned">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column center aligned">
                <h4 class="ui inverted header">最新博客</h4>
                <div id="newblog-container">
                    <div class="ui inverted link list">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="item" th:each="blog : ${newblogs}" th:text="${blog.title}">推荐</a>
                    </div>
                </div>
            </div>

            <div class="ten wide column">
                <img src="../static/images/mmexport1623033757364.jpg" th:src="@{/images/mmexport1623033757364.jpg}"
                     class="ui rounded images" alt="" style="width: 100px">
                <div style="float:right;">
                    <h4 class="ui inverted header center aligned">关于我</h4>
                    <p class="m-opacity-mini ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一个将要秃头的准程序员做的第一个项目，这是我第一次接触前端，全是照着教程敲出</p>
                    <p class="m-opacity-mini ">来的。主要看的是后端，前端随便做了一个。</p>
                </div>
            </div>

            <div class="three wide column center aligned">
                <h4 class="ui inverted header center aligned">联系我</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">Email:&ensp;1294863577@qq.com</a>
                    <br>
                    <a href="#" class="item">Wechat:&ensp;ww17695456199</a>
                </div>
            </div>

        </div>
        <div class="ui inverted section divider "></div>
        <p class="m-opacity-mini">备案号备案号备案号备案号备案号备案号备案号备案号备案号</p>


    </div>
</footer>

<script
        src="https://code.jquery.com/jquery-3.1.1.min.js"
        integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
        crossorigin="anonymous"></script>
<script src="../static/lib/Semantic-UI/dist/semantic.min.js" th:src="@{/lib/Semantic-UI/dist/semantic.min.js}"></script>
<script>
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide')
    });

    $('#newblog-container').load(/*[[@{/footer/newblog}]]*/"/footer/newblog");
</script>
</body>
</html>